<?php
$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->request->baseUrl;
$cs->registerCssFile($baseUrl . '/css/post-list.css');
?>
<ul class="posts-list">
    <?php foreach ($posts as $post): ?>
        <li class="item">
            <div class="image">
                <div>
                    <?php Util::thumbnailImage($post['title'], $post['image'], array(120, 90)) ?>
                </div>
            </div>
            <div class="info">
                <a class="header" href="<?php echo $post['url']; ?>">
                    <?php echo $post['title'] ?>
                </a>
                <div class="content">
                    <?php echo $post['content'] ?>
                    <?php if ($post['hasMore']): ?>
                        &nbsp;...&nbsp;
                        <a class="header" href="<?php echo $post['url']; ?>">
                            <?php echo Yii::t('default', 'read more') ?>
                        </a>
                    <?php endif ?>
                </div>
            </div>
        </li>
    <?php endforeach ?>
</ul>
<div class="pagging">
    <div>
        <?php
        $this->widget('CLinkPager', array(
            'pages' => $pages,
        ))
        ?>
    </div>
</div>
